<!-- File: /app/View/Layouts/admin.ctp -->

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <title><?php echo $titulo; ?></title>
        <?php
            echo $this->Html->script("jquery-1.10.2");
            echo $this->Html->script("bootstrap");
            echo $this->fetch('script');
        ?>
        <script type="text/javascript">
            $(document).ready(function() {
                var i = "<?php echo $index; ?>";
                $("ul.nav.navbar-nav.side-nav").find("li").each(function(index) {
                    $(this).removeClass("active");
                    if(i == index)  $(this).addClass("active");
                });
            });
        </script>
	<?php
                echo $this->Html->css('cake.generic');
		echo $this->Html->css('bootstrap');
		echo $this->Html->css('uniarte-theme');
		echo $this->Html->css('sb-admin');
		echo $this->Html->css('font-awesome.min');
		echo $this->Html->css('http://cdn.oesmith.co.uk/morris-0.4.3.min');
	?>
    </head>
    <body>
        <div id="wrapper">
            <!-- Sidebar -->
            <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <?php echo $this->Html->link("Uniarte Admin", "/Admin/", array("class" => "navbar-brand")); ?>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse navbar-ex1-collapse">
                    <ul class="nav navbar-nav side-nav">
                        <li class="active">
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-dashboard")) . " Dashboard" ,
                                    "/Admin/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                        <li>
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-file")) . " Proyectos" ,
                                    "/Admin/Proyectos/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                        <li>
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-file")) . " Campos de Acción" ,
                                    "/Admin/Campos/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                        <li>
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-file")) . " Especialidades" ,
                                    "/Admin/Especialidades/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                        <li>
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-user")) . " Personal" ,
                                    "/Personal/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                        <li>
                            <?php 
                                echo $this->Html->link(
                                    $this->Html->tag("i", "", array("class" => "fa fa-edit")) . " Información" ,
                                    "/Informacion/", 
                                    array("escape" => false)
                                ); 
                            ?>
                        </li>
                    </ul>

                    <ul class="nav navbar-nav navbar-right navbar-user">
                        <li class="dropdown messages-dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-envelope"></i> Messages <span class="badge">7</span> <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li class="dropdown-header">7 New Messages</li>
                                <li class="message-preview">
                                    <a href="#">
                                        <span class="avatar"><img src="http://placehold.it/50x50"></span>
                                        <span class="name">John Smith:</span>
                                        <span class="message">Hey there, I wanted to ask you something...</span>
                                        <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                                    </a>
                                </li>
                                <li class="divider"></li>
                                <li class="message-preview">
                                    <a href="#">
                                        <span class="avatar"><img src="http://placehold.it/50x50"></span>
                                        <span class="name">John Smith:</span>
                                        <span class="message">Hey there, I wanted to ask you something...</span>
                                        <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                                    </a>
                                </li>
                                <li class="divider"></li>
                                <li class="message-preview">
                                    <a href="#">
                                        <span class="avatar"><img src="http://placehold.it/50x50"></span>
                                        <span class="name">John Smith:</span>
                                        <span class="message">Hey there, I wanted to ask you something...</span>
                                        <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                                    </a>
                                </li>
                                <li class="divider"></li>
                                <li><a href="#">View Inbox <span class="badge">7</span></a></li>
                            </ul>
                        </li>
                        <li class="dropdown alerts-dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bell"></i> Alerts <span class="badge">3</span> <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Default <span class="label label-default">Default</span></a></li>
                                <li><a href="#">Primary <span class="label label-primary">Primary</span></a></li>
                                <li><a href="#">Success <span class="label label-success">Success</span></a></li>
                                <li><a href="#">Info <span class="label label-info">Info</span></a></li>
                                <li><a href="#">Warning <span class="label label-warning">Warning</span></a></li>
                                <li><a href="#">Danger <span class="label label-danger">Danger</span></a></li>
                                <li class="divider"></li>
                                <li><a href="#">View All</a></li>
                            </ul>
                        </li>
                        <li class="dropdown user-dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> John Smith <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#"><i class="fa fa-user"></i> Profile</a></li>
                                <li><a href="#"><i class="fa fa-envelope"></i> Inbox <span class="badge">7</span></a></li>
                                <li><a href="#"><i class="fa fa-gear"></i> Settings</a></li>
                                <li class="divider"></li>
                                <li><a href="#"><i class="fa fa-power-off"></i> Log Out</a></li>
                            </ul>
                        </li>
                    </ul>
                </div><!-- /.navbar-collapse -->
            </nav>
            
            <div id="page-wrapper">
                <div class="row">
                    <div class="col-lg-12">
                        <?php echo $this->html->getCrumbList(
                                array(
                                    'class' => 'breadcrumb',
                                    "firstClass" => false,
                                    "lastClass" => "active"
                                ),
                                array(
                                    'text' => $this->Html->tag("i", "", array("class" => "fa fa-file")) . " Dashboard",
                                    "escape" => false,
                                    "url" => "/Admin"
                                )
                            );
                        ?>
                        
                        <?php echo $this->Session->flash(); ?>
                        
                        <?php echo $this->fetch('content'); ?>
                    </div>
                </div>
            </div>
        </div>
        
        
        <!-- JavaScript -->
        <?php
            echo $this->Html->script("default");
        ?>
    </body>
</html>